<html>
<head>
<title>File Source for TestMatrix.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">PHPExcel</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                    
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          		  [ <a href="../classtrees_PHPExcel.html" class="menu">class tree: PHPExcel</a> ]
		  [ <a href="../elementindex_PHPExcel.html" class="menu">index: PHPExcel</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_PHPExcel.html">PHPExcel</a><br />
              <a href="../li_JAMA.html">JAMA</a><br />
              <a href="../li_Math_Stats.html">Math_Stats</a><br />
              <a href="../li_PHPExcel_CachedObjectStorage.html">PHPExcel_CachedObjectStorage</a><br />
              <a href="../li_PHPExcel_Calculation.html">PHPExcel_Calculation</a><br />
              <a href="../li_PHPExcel_Cell.html">PHPExcel_Cell</a><br />
              <a href="../li_PHPExcel_Chart.html">PHPExcel_Chart</a><br />
              <a href="../li_PHPExcel_Chart_Renderer.html">PHPExcel_Chart_Renderer</a><br />
              <a href="../li_PHPExcel_Reader.html">PHPExcel_Reader</a><br />
              <a href="../li_PHPExcel_Reader_Excel5.html">PHPExcel_Reader_Excel5</a><br />
              <a href="../li_PHPExcel_Reader_Excel2007.html">PHPExcel_Reader_Excel2007</a><br />
              <a href="../li_PHPExcel_RichText.html">PHPExcel_RichText</a><br />
              <a href="../li_PHPExcel_Settings.html">PHPExcel_Settings</a><br />
              <a href="../li_PHPExcel_Shared.html">PHPExcel_Shared</a><br />
              <a href="../li_PHPExcel_Shared_Escher.html">PHPExcel_Shared_Escher</a><br />
              <a href="../li_PHPExcel_Shared_OLE.html">PHPExcel_Shared_OLE</a><br />
              <a href="../li_PHPExcel_Shared_Trend.html">PHPExcel_Shared_Trend</a><br />
              <a href="../li_PHPExcel_Shared_ZipArchive.html">PHPExcel_Shared_ZipArchive</a><br />
              <a href="../li_PHPExcel_Style.html">PHPExcel_Style</a><br />
              <a href="../li_PHPExcel_Worksheet.html">PHPExcel_Worksheet</a><br />
              <a href="../li_PHPExcel_Worksheet_Drawing.html">PHPExcel_Worksheet_Drawing</a><br />
              <a href="../li_PHPExcel_Writer.html">PHPExcel_Writer</a><br />
              <a href="../li_PHPExcel_Writer_Excel5.html">PHPExcel_Writer_Excel5</a><br />
              <a href="../li_PHPExcel_Writer_Excel2007.html">PHPExcel_Writer_Excel2007</a><br />
            <br /><br />
                  
      
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file TestMatrix.php</h1>
<p>Documentation is available at <a href="../PHPExcel/_PHPExcel---Shared---JAMA---tests---TestMatrix.php.html">TestMatrix.php</a></p>
<div class="src-code">
<ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-inc">require_once&nbsp;</span><span class="src-str">&quot;../Matrix.php&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a4"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-key">class&nbsp;</span><a href="../PHPExcel/TestMatrix.html">TestMatrix</a>&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a6"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a7"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodTestMatrix">TestMatrix</a><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a8"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a9"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;define&nbsp;test&nbsp;variables</span></div></li>
<li><div class="src-line"><a name="a10"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a11"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a12"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$warningCount&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a13"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$columnwise&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">2.</span><span class="src-sym">,</span><span class="src-num">3.</span><span class="src-sym">,</span><span class="src-num">4.</span><span class="src-sym">,</span><span class="src-num">5.</span><span class="src-sym">,</span><span class="src-num">6.</span><span class="src-sym">,</span><span class="src-num">7.</span><span class="src-sym">,</span><span class="src-num">8.</span><span class="src-sym">,</span><span class="src-num">9.</span><span class="src-sym">,</span><span class="src-num">10.</span><span class="src-sym">,</span><span class="src-num">11.</span><span class="src-sym">,</span><span class="src-num">12.</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a14"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rowwise&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">4.</span><span class="src-sym">,</span><span class="src-num">7.</span><span class="src-sym">,</span><span class="src-num">10.</span><span class="src-sym">,</span><span class="src-num">2.</span><span class="src-sym">,</span><span class="src-num">5.</span><span class="src-sym">,</span><span class="src-num">8.</span><span class="src-sym">,</span><span class="src-num">11.</span><span class="src-sym">,</span><span class="src-num">3.</span><span class="src-sym">,</span><span class="src-num">6.</span><span class="src-sym">,</span><span class="src-num">9.</span><span class="src-sym">,</span><span class="src-num">12.</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a15"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$avals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">4.</span><span class="src-sym">,</span><span class="src-num">7.</span><span class="src-sym">,</span><span class="src-num">10.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">2.</span><span class="src-sym">,</span><span class="src-num">5.</span><span class="src-sym">,</span><span class="src-num">8.</span><span class="src-sym">,</span><span class="src-num">11.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">3.</span><span class="src-sym">,</span><span class="src-num">6.</span><span class="src-sym">,</span><span class="src-num">9.</span><span class="src-sym">,</span><span class="src-num">12.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a16"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rankdef&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-var">$avals</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a17"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tvals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">2.</span><span class="src-sym">,</span><span class="src-num">3.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">4.</span><span class="src-sym">,</span><span class="src-num">5.</span><span class="src-sym">,</span><span class="src-num">6.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">7.</span><span class="src-sym">,</span><span class="src-num">8.</span><span class="src-sym">,</span><span class="src-num">9.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">10.</span><span class="src-sym">,</span><span class="src-num">11.</span><span class="src-sym">,</span><span class="src-num">12.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a18"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$subavals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">5.</span><span class="src-sym">,</span><span class="src-num">8.</span><span class="src-sym">,</span><span class="src-num">11.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">6.</span><span class="src-sym">,</span><span class="src-num">9.</span><span class="src-sym">,</span><span class="src-num">12.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a19"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rvals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">4.</span><span class="src-sym">,</span><span class="src-num">7.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">2.</span><span class="src-sym">,</span><span class="src-num">5.</span><span class="src-sym">,</span><span class="src-num">8.</span><span class="src-sym">,</span><span class="src-num">11.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">3.</span><span class="src-sym">,</span><span class="src-num">6.</span><span class="src-sym">,</span><span class="src-num">9.</span><span class="src-sym">,</span><span class="src-num">12.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a20"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pvals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">1.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">2.</span><span class="src-sym">,</span><span class="src-num">3.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">3.</span><span class="src-sym">,</span><span class="src-num">6.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a21"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ivals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a22"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$evals&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">2.e-7</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">0.</span><span class="src-sym">,</span>-<span class="src-num">2.e-7</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">1.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">,</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a23"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$square&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">166.</span><span class="src-sym">,</span><span class="src-num">188.</span><span class="src-sym">,</span><span class="src-num">210.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">188.</span><span class="src-sym">,</span><span class="src-num">214.</span><span class="src-sym">,</span><span class="src-num">240.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">210.</span><span class="src-sym">,</span><span class="src-num">240.</span><span class="src-sym">,</span><span class="src-num">270.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a24"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sqSolution&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">13.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">15.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a25"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$condmat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1.</span><span class="src-sym">,</span><span class="src-num">3.</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">7.</span><span class="src-sym">,</span><span class="src-num">9.</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a26"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rows&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">3</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a27"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$cols&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">4</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a28"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$invalidID&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">5</span><span class="src-sym">;&nbsp;</span><span class="src-comm">/*&nbsp;should&nbsp;trigger&nbsp;bad&nbsp;shape&nbsp;for&nbsp;construction&nbsp;with&nbsp;val&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a29"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$raggedr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;&nbsp;</span><span class="src-comm">/*&nbsp;(raggedr,raggedc)&nbsp;should&nbsp;be&nbsp;out&nbsp;of&nbsp;bounds&nbsp;in&nbsp;ragged&nbsp;array&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a30"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$raggedc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">4</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a31"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$validID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">3</span><span class="src-sym">;&nbsp;</span><span class="src-comm">/*&nbsp;leading&nbsp;dimension&nbsp;of&nbsp;intended&nbsp;test&nbsp;Matrices&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a32"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$nonconformld&nbsp;</span>=&nbsp;<span class="src-num">4</span><span class="src-sym">;&nbsp;</span><span class="src-comm">/*&nbsp;leading&nbsp;dimension&nbsp;which&nbsp;is&nbsp;valid,&nbsp;but&nbsp;nonconforming&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a33"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ib&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">;&nbsp;</span><span class="src-comm">/*&nbsp;index&nbsp;ranges&nbsp;for&nbsp;sub&nbsp;Matrix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a34"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ie&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">2</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a35"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$jb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a36"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$je&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">3</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a37"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rowindexset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">2</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a38"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$badrowindexset&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a39"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$columnindexset&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">2</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a40"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$badcolumnindexset&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span><span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">2</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a41"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$columnsummax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">33.</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a42"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rowsummax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">30.</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a43"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sumofdiagonals&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">15</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a44"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$sumofsquares&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-num">650</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a45"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a46"></a>&nbsp;&nbsp;&nbsp;&nbsp;/**</div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Test&nbsp;matrix&nbsp;methods</div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;&nbsp;&nbsp;&nbsp;*/</div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;&nbsp;&nbsp;&nbsp;/**</div></li>
<li><div class="src-line"><a name="a51"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Constructors&nbsp;and&nbsp;constructor-like&nbsp;methods:</div></li>
<li><div class="src-line"><a name="a52"></a>&nbsp;&nbsp;&nbsp;&nbsp;*</div></li>
<li><div class="src-line"><a name="a53"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Matrix(double[],&nbsp;int)</div></li>
<li><div class="src-line"><a name="a54"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Matrix(double[][])</div></li>
<li><div class="src-line"><a name="a55"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Matrix(int,&nbsp;int)</div></li>
<li><div class="src-line"><a name="a56"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Matrix(int,&nbsp;int,&nbsp;double)</div></li>
<li><div class="src-line"><a name="a57"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;Matrix(int,&nbsp;int,&nbsp;double[][])</div></li>
<li><div class="src-line"><a name="a58"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;constructWithCopy(double[][])</div></li>
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;random(int,int)</div></li>
<li><div class="src-line"><a name="a60"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;identity(int)</div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;&nbsp;&nbsp;&nbsp;*/</div></li>
<li><div class="src-line"><a name="a62"></a>&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;&lt;p&gt;Testing&nbsp;constructors&nbsp;and&nbsp;constructor-like&nbsp;methods...&lt;/p&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a63"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a64"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$columnwise</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$A&nbsp;</span>instanceof&nbsp;<span class="src-id">Matrix</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Column-packed&nbsp;constructor...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a68"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Column-packed&nbsp;constructor...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Unable&nbsp;to&nbsp;construct&nbsp;Matrix&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$T&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$tvals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$T&nbsp;</span>instanceof&nbsp;<span class="src-id">Matrix</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a72"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;2D&nbsp;array&nbsp;constructor...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a73"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;2D&nbsp;array&nbsp;constructor...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Unable&nbsp;to&nbsp;construct&nbsp;Matrix&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a75"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$columnwise</span><span class="src-sym">,&nbsp;</span><span class="src-var">$validID</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a77"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$B&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$avals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tmp&nbsp;</span>=&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$avals</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-num">0.0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$C&nbsp;</span>=&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">minus</span><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$avals</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-var">$tmp</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$B&nbsp;</span>=&nbsp;<span class="src-id">Matrix</span><span class="src-sym">::</span><span class="src-id">constructWithCopy</span><span class="src-sym">(</span><span class="src-var">$avals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$tmp&nbsp;</span>=&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$avals</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]&nbsp;</span>=&nbsp;<span class="src-num">0.0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a85"></a>&nbsp;&nbsp;&nbsp;&nbsp;/**&nbsp;check&nbsp;that&nbsp;constructWithCopy&nbsp;behaves&nbsp;properly&nbsp;**/</div></li>
<li><div class="src-line"><a name="a86"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;(&nbsp;</span><span class="src-var">$tmp&nbsp;</span>-&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">get</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">)&nbsp;)&nbsp;</span>!=&nbsp;<span class="src-num">0.0&nbsp;</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a87"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;constructWithCopy...&nbsp;&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;copy&nbsp;not&nbsp;effected...&nbsp;data&nbsp;visible&nbsp;outside&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a88"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a89"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;constructWithCopy...&nbsp;&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a90"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a91"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$I&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$ivals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a92"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$I</span><span class="src-sym">,</span><span class="src-id">Matrix</span><span class="src-sym">::</span><span class="src-id">identity</span><span class="src-sym">(</span><span class="src-num">3</span><span class="src-sym">,</span><span class="src-num">4</span><span class="src-sym">))&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a93"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;identity...&nbsp;&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a94"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;identity...&nbsp;&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;identity&nbsp;Matrix&nbsp;not&nbsp;successfully&nbsp;created&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;&nbsp;&nbsp;&nbsp;/**</div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Access&nbsp;Methods:</div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;&nbsp;&nbsp;&nbsp;*</div></li>
<li><div class="src-line"><a name="a100"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getColumnDimension()</div></li>
<li><div class="src-line"><a name="a101"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getRowDimension()</div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getArray()</div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getArrayCopy()</div></li>
<li><div class="src-line"><a name="a104"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getColumnPackedCopy()</div></li>
<li><div class="src-line"><a name="a105"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getRowPackedCopy()</div></li>
<li><div class="src-line"><a name="a106"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;get(int,int)</div></li>
<li><div class="src-line"><a name="a107"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getMatrix(int,int,int,int)</div></li>
<li><div class="src-line"><a name="a108"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getMatrix(int,int,int[])</div></li>
<li><div class="src-line"><a name="a109"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getMatrix(int[],int,int)</div></li>
<li><div class="src-line"><a name="a110"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;getMatrix(int[],int[])</div></li>
<li><div class="src-line"><a name="a111"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;set(int,int,double)</div></li>
<li><div class="src-line"><a name="a112"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;setMatrix(int,int,int,int,Matrix)</div></li>
<li><div class="src-line"><a name="a113"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;setMatrix(int,int,int[],Matrix)</div></li>
<li><div class="src-line"><a name="a114"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;setMatrix(int[],int,int,Matrix)</div></li>
<li><div class="src-line"><a name="a115"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;setMatrix(int[],int[],Matrix)</div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;&nbsp;&nbsp;&nbsp;*/</div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;&lt;p&gt;Testing&nbsp;access&nbsp;methods...&lt;/p&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a119"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$B&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$avals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a120"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-var">$rows</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a121"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;getRowDimension...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a122"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a123"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;getRowDimension...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a124"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a125"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">getColumnDimension</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-var">$cols</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;getColumnDimension...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a128"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;getColumnDimension...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a129"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a130"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$barray&nbsp;</span>=&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">getArray</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckArrays">checkArrays</a><span class="src-sym">(</span><span class="src-var">$barray</span><span class="src-sym">,&nbsp;</span><span class="src-var">$avals</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a132"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;getArray...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a134"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;getArray...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a135"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a136"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$bpacked&nbsp;</span>=&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">getColumnPackedCopy</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a137"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckArrays">checkArrays</a><span class="src-sym">(</span><span class="src-var">$bpacked</span><span class="src-sym">,&nbsp;</span><span class="src-var">$columnwise</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a138"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;getColumnPackedCopy...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a139"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a140"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;getColumnPackedCopy...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a141"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a142"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$bpacked&nbsp;</span>=&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">getRowPackedCopy</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a143"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckArrays">checkArrays</a><span class="src-sym">(</span><span class="src-var">$bpacked</span><span class="src-sym">,&nbsp;</span><span class="src-var">$rowwise</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;getRowPackedCopy...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a145"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a146"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;getRowPackedCopy...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;&nbsp;&nbsp;&nbsp;/**</div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Array-like&nbsp;methods:</div></li>
<li><div class="src-line"><a name="a150"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;minus</div></li>
<li><div class="src-line"><a name="a151"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;minusEquals</div></li>
<li><div class="src-line"><a name="a152"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;plus</div></li>
<li><div class="src-line"><a name="a153"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;plusEquals</div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;arrayLeftDivide</div></li>
<li><div class="src-line"><a name="a155"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;arrayLeftDivideEquals</div></li>
<li><div class="src-line"><a name="a156"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;arrayRightDivide</div></li>
<li><div class="src-line"><a name="a157"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;arrayRightDivideEquals</div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;arrayTimes</div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;arrayTimesEquals</div></li>
<li><div class="src-line"><a name="a160"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;uminus</div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;&nbsp;&nbsp;&nbsp;*/</div></li>
<li><div class="src-line"><a name="a162"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;&lt;p&gt;Testing&nbsp;array-like&nbsp;methods...&lt;/p&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a163"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a164"></a>&nbsp;&nbsp;&nbsp;&nbsp;/**</div></li>
<li><div class="src-line"><a name="a165"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;I/O&nbsp;methods:</div></li>
<li><div class="src-line"><a name="a166"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;read</div></li>
<li><div class="src-line"><a name="a167"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;print</div></li>
<li><div class="src-line"><a name="a168"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;serializable:</div></li>
<li><div class="src-line"><a name="a169"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;writeObject</div></li>
<li><div class="src-line"><a name="a170"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;readObject</div></li>
<li><div class="src-line"><a name="a171"></a>&nbsp;&nbsp;&nbsp;&nbsp;*/</div></li>
<li><div class="src-line"><a name="a172"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;&lt;p&gt;Testing&nbsp;I/O&nbsp;methods...&lt;/p&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a173"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a174"></a>&nbsp;&nbsp;&nbsp;&nbsp;/**</div></li>
<li><div class="src-line"><a name="a175"></a>&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Test&nbsp;linear&nbsp;algebra&nbsp;methods</div></li>
<li><div class="src-line"><a name="a176"></a>&nbsp;&nbsp;&nbsp;&nbsp;*/</div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<span class="src-str">&quot;&lt;p&gt;Testing&nbsp;linear&nbsp;algebra&nbsp;methods...&lt;p&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a178"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a179"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$columnwise</span><span class="src-sym">,&nbsp;</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a180"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">transpose</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$T</span><span class="src-sym">)&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a181"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Transpose&nbsp;check...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a182"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a183"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Transpose&nbsp;check...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Matrices&nbsp;are&nbsp;not&nbsp;equal&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$columnsummax</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Maximum&nbsp;column&nbsp;sum...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a187"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a188"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Maximum&nbsp;column&nbsp;sum...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Incorrect:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;!=&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$columnsummax</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a189"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a190"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">normInf</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$rowsummax</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Maximum&nbsp;row&nbsp;sum...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a192"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a193"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Maximum&nbsp;row&nbsp;sum...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Incorrect:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">normInf</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;!=&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$rowsummax&nbsp;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a194"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a195"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">normF</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/sqrt">sqrt</a><span class="src-sym">(</span><span class="src-var">$sumofsquares</span><span class="src-sym">)))</span></div></li>
<li><div class="src-line"><a name="a196"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Frobenius&nbsp;norm...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a197"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a198"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Frobenius&nbsp;norm...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Incorrect:&quot;&nbsp;</span>.&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">normF</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;!=&nbsp;&quot;&nbsp;</span>.&nbsp;<a href="http://www.php.net/sqrt">sqrt</a><span class="src-sym">(</span><span class="src-var">$sumofsquares</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a199"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a200"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">trace</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$sumofdiagonals</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a201"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Matrix&nbsp;trace...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a202"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a203"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Matrix&nbsp;trace...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Incorrect:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">trace</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;!=&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$sumofdiagonals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a204"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a205"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$B&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">getMatrix</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a206"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">det</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">0&nbsp;</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a207"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Matrix&nbsp;determinant...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a208"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a209"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Matrix&nbsp;determinant...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Incorrect:&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">det</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-str">&quot;&nbsp;!=&nbsp;&quot;&nbsp;</span>.&nbsp;<span class="src-num">0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a210"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a211"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$columnwise</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a212"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SQ&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$square</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a213"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$SQ</span><span class="src-sym">,&nbsp;</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">transpose</span><span class="src-sym">(</span><span class="src-sym">))))</span></div></li>
<li><div class="src-line"><a name="a214"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;times(Matrix)...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a215"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a216"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;times(Matrix)...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;Unable&nbsp;to&nbsp;multiply&nbsp;matrices&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a217"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SQ</span><span class="src-sym">-&gt;</span><span class="src-id">toHTML</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a218"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$AT</span><span class="src-sym">-&gt;</span><span class="src-id">toHTML</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a219"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a220"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a221"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$columnwise</span><span class="src-sym">,&nbsp;</span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a222"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a223"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$QR&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">qr</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a224"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$R&nbsp;</span>=&nbsp;<span class="src-var">$QR</span><span class="src-sym">-&gt;</span><span class="src-id">getR</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a225"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$Q&nbsp;</span>=&nbsp;<span class="src-var">$QR</span><span class="src-sym">-&gt;</span><span class="src-id">getQ</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a226"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">,&nbsp;</span><span class="src-var">$Q</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$R</span><span class="src-sym">)))</span></div></li>
<li><div class="src-line"><a name="a227"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;QRDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a228"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a229"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;QRDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;qr&nbsp;decomposition&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a230"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a231"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$columnwise</span><span class="src-sym">,&nbsp;</span><span class="src-num">4</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a232"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SVD&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">svd</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a233"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$U&nbsp;</span>=&nbsp;<span class="src-var">$SVD</span><span class="src-sym">-&gt;</span><span class="src-id">getU</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a234"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$S&nbsp;</span>=&nbsp;<span class="src-var">$SVD</span><span class="src-sym">-&gt;</span><span class="src-id">getS</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a235"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$V&nbsp;</span>=&nbsp;<span class="src-var">$SVD</span><span class="src-sym">-&gt;</span><span class="src-id">getV</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a236"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">,&nbsp;</span><span class="src-var">$U</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$S</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$V</span><span class="src-sym">-&gt;</span><span class="src-id">transpose</span><span class="src-sym">(</span><span class="src-sym">)))))</span></div></li>
<li><div class="src-line"><a name="a237"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;SingularValueDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a238"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a239"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;SingularValueDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;singular&nbsp;value&nbsp;decomposition&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a240"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a241"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$n&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">getColumnDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a242"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">getMatrix</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$n</span>-<span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$n</span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a243"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">set</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-num">0.</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a244"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$LU&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">lu</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$L&nbsp;&nbsp;</span>=&nbsp;<span class="src-var">$LU</span><span class="src-sym">-&gt;</span><span class="src-id">getL</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">getMatrix</span><span class="src-sym">(</span><span class="src-var">$LU</span><span class="src-sym">-&gt;</span><span class="src-id">getPivot</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$n</span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$L</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$LU</span><span class="src-sym">-&gt;</span><span class="src-id">getU</span><span class="src-sym">(</span><span class="src-sym">)))&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a248"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;LUDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a249"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a250"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;LUDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;LU&nbsp;decomposition&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a251"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a252"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$X&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">inverse</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a253"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-id">Matrix</span><span class="src-sym">::</span><span class="src-id">identity</span><span class="src-sym">(</span><span class="src-num">3</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">))&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a254"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;inverse()...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a255"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;inverse()...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;inverse&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a257"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a258"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$DEF&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$rankdef</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$DEF</span><span class="src-sym">-&gt;</span><span class="src-id">rank</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><a href="http://www.php.net/min">min</a><span class="src-sym">(</span><span class="src-var">$DEF</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$DEF</span><span class="src-sym">-&gt;</span><span class="src-id">getColumnDimension</span><span class="src-sym">(</span><span class="src-sym">))</span>-<span class="src-num">1</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Rank...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a261"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-str">&quot;Rank...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;incorrect&nbsp;rank&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a263"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a264"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$B&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$condmat</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a265"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SVD&nbsp;</span>=&nbsp;<span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">svd</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a266"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$singularvalues&nbsp;</span>=&nbsp;<span class="src-var">$SVD</span><span class="src-sym">-&gt;</span><span class="src-id">getSingularValues</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a267"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">cond</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$singularvalues</span><span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">]</span>/<span class="src-var">$singularvalues</span><span class="src-sym">[</span><a href="http://www.php.net/min">min</a><span class="src-sym">(</span><span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-var">$B</span><span class="src-sym">-&gt;</span><span class="src-id">getColumnDimension</span><span class="src-sym">(</span><span class="src-sym">))</span>-<span class="src-num">1</span><span class="src-sym">]</span><span class="src-sym">))</span></div></li>
<li><div class="src-line"><a name="a268"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;Condition&nbsp;number...&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a269"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a270"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-str">&quot;Condition&nbsp;number...&quot;</span><span class="src-sym">,&nbsp;</span><span class="src-str">&quot;incorrect&nbsp;condition&nbsp;number&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a271"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SUB&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$subavals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$O&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$SUB</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">1.0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SOL&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$sqSolution</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$SQ&nbsp;</span>=&nbsp;<span class="src-var">$SUB</span><span class="src-sym">-&gt;</span><span class="src-id">getMatrix</span><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$SUB</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span>-<span class="src-num">1</span><span class="src-sym">,</span><span class="src-num">0</span><span class="src-sym">,</span><span class="src-var">$SUB</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span>-<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$SQ</span><span class="src-sym">-&gt;</span><span class="src-id">solve</span><span class="src-sym">(</span><span class="src-var">$SOL</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-var">$O</span><span class="src-sym">)&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;solve()...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;solve()...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;lu&nbsp;solve&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$pvals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$Chol&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">chol</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a283"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$L&nbsp;</span>=&nbsp;<span class="src-var">$Chol</span><span class="src-sym">-&gt;</span><span class="src-id">getL</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a284"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">,&nbsp;</span><span class="src-var">$L</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$L</span><span class="src-sym">-&gt;</span><span class="src-id">transpose</span><span class="src-sym">(</span><span class="src-sym">)))&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a285"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;CholeskyDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a286"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a287"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;CholeskyDecomposition...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;Cholesky&nbsp;decomposition&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a288"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$X&nbsp;</span>=&nbsp;<span class="src-var">$Chol</span><span class="src-sym">-&gt;</span><span class="src-id">solve</span><span class="src-sym">(</span><span class="src-id">Matrix</span><span class="src-sym">::</span><span class="src-id">identity</span><span class="src-sym">(</span><span class="src-num">3</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a290"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">)</span><span class="src-sym">,&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">::</span><span class="src-id">identity</span><span class="src-sym">(</span><span class="src-num">3</span><span class="src-sym">,</span><span class="src-num">3</span><span class="src-sym">))&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a291"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;CholeskyDecomposition&nbsp;solve()...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a292"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a293"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;CholeskyDecomposition&nbsp;solve()...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;Choleskydecomposition&nbsp;solve&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a294"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a295"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$Eig&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">eig</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a296"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$D&nbsp;</span>=&nbsp;<span class="src-var">$Eig</span><span class="src-sym">-&gt;</span><span class="src-id">getD</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a297"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$V&nbsp;</span>=&nbsp;<span class="src-var">$Eig</span><span class="src-sym">-&gt;</span><span class="src-id">getV</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a298"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$V</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-var">$V</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$D</span><span class="src-sym">))&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a299"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;EigenvalueDecomposition&nbsp;(symmetric)...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a300"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a301"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;EigenvalueDecomposition&nbsp;(symmetric)...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;symmetric&nbsp;Eigenvalue&nbsp;decomposition&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a302"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a303"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$evals</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a304"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$Eig&nbsp;</span>=&nbsp;<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">eig</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a305"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$D&nbsp;</span>=&nbsp;<span class="src-var">$Eig</span><span class="src-sym">-&gt;</span><span class="src-id">getD</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a306"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$V&nbsp;</span>=&nbsp;<span class="src-var">$Eig</span><span class="src-sym">-&gt;</span><span class="src-id">getV</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a307"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$V</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-var">$V</span><span class="src-sym">-&gt;</span><span class="src-id">times</span><span class="src-sym">(</span><span class="src-var">$D</span><span class="src-sym">))&nbsp;)</span></div></li>
<li><div class="src-line"><a name="a308"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-str">&quot;EigenvalueDecomposition&nbsp;(nonsymmetric)...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a309"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a310"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$errorCount&nbsp;</span>=&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$errorCount</span><span class="src-sym">,</span><span class="src-str">&quot;EigenvalueDecomposition&nbsp;(nonsymmetric)...&quot;</span><span class="src-sym">,</span><span class="src-str">&quot;incorrect&nbsp;nonsymmetric&nbsp;Eigenvalue&nbsp;decomposition&nbsp;calculation&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a311"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a312"></a>&nbsp;&nbsp;&nbsp;&nbsp;print<span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">&lt;b&gt;{<span class="src-var">$errorCount</span><span class="src-sym">}</span>&nbsp;total&nbsp;errors&lt;/b&gt;.</span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a313"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a314"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a315"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a316"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Print&nbsp;appropriate&nbsp;messages&nbsp;for&nbsp;successful&nbsp;outcome&nbsp;try</span></div></li>
<li><div class="src-line"><a name="a317"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$s&nbsp;</span></div></li>
<li><div class="src-line"><a name="a318"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$e&nbsp;</span></div></li>
<li><div class="src-line"><a name="a319"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a320"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodtry_success">try_success</a><span class="src-sym">(</span><span class="src-var">$s</span><span class="src-sym">,&nbsp;</span><span class="src-var">$e&nbsp;</span>=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a321"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;&gt;&nbsp;&quot;</span>.&nbsp;<span class="src-var">$s&nbsp;</span>.<span class="src-str">&quot;success&lt;br&nbsp;/&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a322"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$e&nbsp;</span>!=&nbsp;<span class="src-str">&quot;&quot;</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a323"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;&gt;&nbsp;Message:&nbsp;&quot;</span>.&nbsp;<span class="src-var">$e&nbsp;</span>.<span class="src-str">&quot;&lt;br&nbsp;/&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a324"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a325"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a326"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a327"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Print&nbsp;appropriate&nbsp;messages&nbsp;for&nbsp;unsuccessful&nbsp;outcome&nbsp;try</span></div></li>
<li><div class="src-line"><a name="a328"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$count&nbsp;</span></div></li>
<li><div class="src-line"><a name="a329"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$s&nbsp;</span></div></li>
<li><div class="src-line"><a name="a330"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$e&nbsp;</span></div></li>
<li><div class="src-line"><a name="a331"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc">incremented&nbsp;counter</span></div></li>
<li><div class="src-line"><a name="a332"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a333"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodtry_failure">try_failure</a><span class="src-sym">(</span><span class="src-var">$count</span><span class="src-sym">,&nbsp;</span><span class="src-var">$s</span><span class="src-sym">,&nbsp;</span><span class="src-var">$e</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a334"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;&gt;&nbsp;&quot;</span>.&nbsp;<span class="src-var">$s&nbsp;</span>.<span class="src-str">&quot;***&nbsp;failure&nbsp;***&lt;br&nbsp;/&gt;&gt;&nbsp;Message:&nbsp;&quot;</span>.&nbsp;<span class="src-var">$e&nbsp;</span>.<span class="src-str">&quot;&lt;br&nbsp;/&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a335"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span>++<span class="src-var">$count</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a336"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a337"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a338"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a339"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Print&nbsp;appropriate&nbsp;messages&nbsp;for&nbsp;unsuccessful&nbsp;outcome&nbsp;try</span></div></li>
<li><div class="src-line"><a name="a340"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc-var">$count&nbsp;</span></div></li>
<li><div class="src-line"><a name="a341"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$s&nbsp;</span></div></li>
<li><div class="src-line"><a name="a342"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$e&nbsp;</span></div></li>
<li><div class="src-line"><a name="a343"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">int&nbsp;</span><span class="src-doc">incremented&nbsp;counter</span></div></li>
<li><div class="src-line"><a name="a344"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a345"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodtry_warning">try_warning</a><span class="src-sym">(</span><span class="src-var">$count</span><span class="src-sym">,&nbsp;</span><span class="src-var">$s</span><span class="src-sym">,&nbsp;</span><span class="src-var">$e</span>=<span class="src-str">&quot;&quot;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a346"></a>&nbsp;&nbsp;&nbsp;&nbsp;print&nbsp;<span class="src-str">&quot;&gt;&nbsp;&quot;</span>.&nbsp;<span class="src-var">$s&nbsp;</span>.<span class="src-str">&quot;***&nbsp;warning&nbsp;***&lt;br&nbsp;/&gt;&gt;&nbsp;Message:&nbsp;&quot;</span>.&nbsp;<span class="src-var">$e&nbsp;</span>.<span class="src-str">&quot;&lt;br&nbsp;/&gt;&quot;</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a347"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span>++<span class="src-var">$count</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a348"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a349"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a350"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a351"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Check&nbsp;magnitude&nbsp;of&nbsp;difference&nbsp;of&nbsp;&quot;scalars&quot;.</span></div></li>
<li><div class="src-line"><a name="a352"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">float&nbsp;</span><span class="src-doc-var">$x&nbsp;</span></div></li>
<li><div class="src-line"><a name="a353"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">float&nbsp;</span><span class="src-doc-var">$y&nbsp;</span></div></li>
<li><div class="src-line"><a name="a354"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a355"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">,&nbsp;</span><span class="src-var">$y</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a356"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$eps&nbsp;</span>=&nbsp;<a href="http://www.php.net/pow">pow</a><span class="src-sym">(</span><span class="src-num">2.0</span><span class="src-sym">,</span>-<span class="src-num">52.0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a357"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$x&nbsp;</span>==&nbsp;<span class="src-num">0&nbsp;</span><span class="src-sym">&amp;&nbsp;</span><a href="http://www.php.net/abs">abs</a><span class="src-sym">(</span><span class="src-var">$y</span><span class="src-sym">)&nbsp;</span>&lt;&nbsp;<span class="src-num">10</span>*<span class="src-var">$eps</span><span class="src-sym">)&nbsp;</span><span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a358"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$y&nbsp;</span>==&nbsp;<span class="src-num">0&nbsp;</span><span class="src-sym">&amp;&nbsp;</span><a href="http://www.php.net/abs">abs</a><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">)&nbsp;</span>&lt;&nbsp;<span class="src-num">10</span>*<span class="src-var">$eps</span><span class="src-sym">)&nbsp;</span><span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a359"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><a href="http://www.php.net/abs">abs</a><span class="src-sym">(</span><span class="src-var">$x</span>-<span class="src-var">$y</span><span class="src-sym">)&nbsp;</span>&gt;&nbsp;<span class="src-num">10&nbsp;</span>*&nbsp;<span class="src-var">$eps&nbsp;</span>*&nbsp;<a href="http://www.php.net/max">max</a><span class="src-sym">(</span><a href="http://www.php.net/abs">abs</a><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">)</span><span class="src-sym">,</span><a href="http://www.php.net/abs">abs</a><span class="src-sym">(</span><span class="src-var">$y</span><span class="src-sym">)))</span></div></li>
<li><div class="src-line"><a name="a360"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a361"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a362"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a363"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a364"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a365"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a366"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Check&nbsp;norm&nbsp;of&nbsp;difference&nbsp;of&nbsp;&quot;vectors&quot;.</span></div></li>
<li><div class="src-line"><a name="a367"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">float&nbsp;</span><span class="src-doc-var">$x[]&nbsp;</span></div></li>
<li><div class="src-line"><a name="a368"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">float&nbsp;</span><span class="src-doc-var">$y[]&nbsp;</span></div></li>
<li><div class="src-line"><a name="a369"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a370"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodcheckVectors">checkVectors</a><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">,&nbsp;</span><span class="src-var">$y</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a371"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$nx&nbsp;</span>=&nbsp;<a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a372"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$ny&nbsp;</span>=&nbsp;<a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$y</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a373"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$nx&nbsp;</span>==&nbsp;<span class="src-var">$ny</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a374"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">for</span><span class="src-sym">(</span><span class="src-var">$i</span>=<span class="src-num">0</span><span class="src-sym">;&nbsp;</span><span class="src-var">$i&nbsp;</span>&lt;&nbsp;<span class="src-var">$nx</span><span class="src-sym">;&nbsp;</span>++<span class="src-var">$i</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a375"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckScalars">checkScalars</a><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">,</span><span class="src-var">$y</span><span class="src-sym">[</span><span class="src-var">$i</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a376"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a377"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">die</span><span class="src-sym">(</span><span class="src-str">&quot;Attempt&nbsp;to&nbsp;compare&nbsp;vectors&nbsp;of&nbsp;different&nbsp;lengths&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a378"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a379"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a380"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a381"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Check&nbsp;norm&nbsp;of&nbsp;difference&nbsp;of&nbsp;&quot;arrays&quot;.</span></div></li>
<li><div class="src-line"><a name="a382"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">float&nbsp;</span><span class="src-doc-var">$x[][]&nbsp;</span></div></li>
<li><div class="src-line"><a name="a383"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">float&nbsp;</span><span class="src-doc-var">$y[][]&nbsp;</span></div></li>
<li><div class="src-line"><a name="a384"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a385"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodcheckArrays">checkArrays</a><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">,&nbsp;</span><span class="src-var">$y</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a386"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$x</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a387"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$B&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id">Matrix</span><span class="src-sym">(</span><span class="src-var">$y</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a388"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">,</span><span class="src-var">$B</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a389"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a390"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a391"></a>&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a392"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;Check&nbsp;norm&nbsp;of&nbsp;difference&nbsp;of&nbsp;&quot;matrices&quot;.</span></div></li>
<li><div class="src-line"><a name="a393"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">matrix&nbsp;</span><span class="src-doc-var">$X&nbsp;</span></div></li>
<li><div class="src-line"><a name="a394"></a><span class="src-doc">&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">matrix&nbsp;</span><span class="src-doc-var">$Y&nbsp;</span></div></li>
<li><div class="src-line"><a name="a395"></a><span class="src-doc">&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a396"></a>&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodcheckMatrices">checkMatrices</a><span class="src-sym">(</span><span class="src-var">$X&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">,&nbsp;</span><span class="src-var">$Y&nbsp;</span>=&nbsp;<span class="src-id">null</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a397"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if</span><span class="src-sym">(&nbsp;</span><span class="src-var">$X&nbsp;</span>==&nbsp;<span class="src-id">null&nbsp;</span>||&nbsp;<span class="src-var">$Y&nbsp;</span>==&nbsp;<span class="src-id">null&nbsp;</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a398"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">false</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a399"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a400"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$eps&nbsp;</span>=&nbsp;<a href="http://www.php.net/pow">pow</a><span class="src-sym">(</span><span class="src-num">2.0</span><span class="src-sym">,</span>-<span class="src-num">52.0</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a401"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">0.&nbsp;</span><span class="src-sym">&amp;&nbsp;</span><span class="src-var">$Y</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>&lt;&nbsp;<span class="src-num">10</span>*<span class="src-var">$eps</span><span class="src-sym">)&nbsp;</span><span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a402"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$Y</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">0.&nbsp;</span><span class="src-sym">&amp;&nbsp;</span><span class="src-var">$X</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>&lt;&nbsp;<span class="src-num">10</span>*<span class="src-var">$eps</span><span class="src-sym">)&nbsp;</span><span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a403"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a404"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$A&nbsp;</span>=&nbsp;<span class="src-var">$X</span><span class="src-sym">-&gt;</span><span class="src-id">minus</span><span class="src-sym">(</span><span class="src-var">$Y</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a405"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a406"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>&gt;&nbsp;<span class="src-num">1000&nbsp;</span>*&nbsp;<span class="src-var">$eps&nbsp;</span>*&nbsp;<a href="http://www.php.net/max">max</a><span class="src-sym">(</span><span class="src-var">$X</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span><span class="src-var">$Y</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">)))</span></div></li>
<li><div class="src-line"><a name="a407"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">die</span><span class="src-sym">(</span><span class="src-str">&quot;The&nbsp;norm&nbsp;of&nbsp;(X-Y)&nbsp;is&nbsp;too&nbsp;large:&nbsp;&quot;</span>.<span class="src-var">$A</span><span class="src-sym">-&gt;</span><span class="src-id">norm1</span><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a408"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">else</span></div></li>
<li><div class="src-line"><a name="a409"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-id">true</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a410"></a>&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a411"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a412"></a><span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a413"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a414"></a><span class="src-var">$test&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><a href="../PHPExcel/TestMatrix.html#methodTestMatrix">TestMatrix</a><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a415"></a><span class="src-php">?&gt;</span></div></li>
</ol>
</div>
        <div class="credit">
		    <hr />
		    Documentation generated on Fri, 12 Oct 2012 00:18:10 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.4</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>